﻿using Microsoft.EntityFrameworkCore;
using Sgr.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.EntityFrameworkCore
{
    /// <summary>
    /// 数据库上下文配置器接口
    /// </summary>
    public interface IDbContextConfigurator
    {
        /// <summary>
        /// 是否支持指定的数据库类型
        /// </summary>
        bool IsSupported(DatabaseType dbType);

        /// <summary>
        /// 配置数据库上下文
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="connectionString"></param>
        void Configure(DbContextOptionsBuilder builder, string connectionString);
    }
}